#include "stdio.h"
#include "stdlib.h"
typedef unsigned char *byte_pointer;
typedef unsigned int uint;

int x_combine_y(int x, int y)
{
    printf("x == %x\r\ny == %x\r\n",x,y);

    return (x & 0xff) | (y & 0xffffff00);
}
unsigned replace_byte(unsigned source, unsigned char replacement, int position)
{
    if((0 <= position) && (3 >= position))
    {
        source = source &~(0xff << (8 * position)) | (replacement << (8 * position));
    }
    return source;


}
int One_or_zero(int x)
{
    return !(x ^ -1) || !(x ^ 0) || !((x & 0xff000000) ^ 0xff000000) || !((x & 0xff) ^ 0);
}

int int_shifts_are_logical(void)
{
    return ((-1 >> 1) & 0x80000000) == 0x80000000;
}


void main(int argc, char *argv[])
{
    if(argc == 1)
        /*result = replace_byte(atoi(argv[1]),atoi(argv[2]),atoi(argv[3]));*/
        int_shifts_are_logical()?printf("int shifts are mathmatic\r\n"):printf("int shifts are logical\r\n");
    else
        printf("Need only 1 argument!\r\n");
}
